package com.mes.cloud.dto;

import com.mes.cloud.annotation.ExcelAttribute;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

/**
 * 系统参数
 *
 * @author wxm
 * @Time 2019-4-16
 */
@ApiModel(value = "ParameterDTO", description = "系统参数信息")
@Data
public class ParameterDTO extends BaseDto implements Serializable {
    private static final long serialVersionUID = 1L;

    /**
     *
     */
    @ApiModelProperty(value = "ID", dataType = "Long")
    @ExcelAttribute(name = "系统参数ID", column = "A")
    private Long id;
    /**
     * 配置的key
     */
    @ApiModelProperty(value = "名称", dataType = "String")
    @ExcelAttribute(name = "名称", column = "B")
    @NotNull(message = "系统配置不能为空！")
    private String sysKey;
    /**
     * 值
     */
    @ApiModelProperty(value = "值", dataType = "String")
    @ExcelAttribute(name = "值", column = "C")
    @NotNull(message = "系统值不能为空！")
    private String value;

    @ApiModelProperty(value = "默认值", dataType = "String")
    private String defaultd;
    /**
     * 类型
     */
    @ApiModelProperty(value = "类型", dataType = "String")
    @ExcelAttribute(name = "类型", column = "D")
    @NotNull(message = "系统类型不能为空！")
    private String type;

    @ApiModelProperty(value = "父类型", dataType = "String")
    private String parentType;

    @ApiModelProperty(value = "参数选项", dataType = "Integer")
    private Integer optione;

    /**
     *
     */
    @ApiModelProperty(value = "创建时间", dataType = "Date")
    @ExcelAttribute(name = "创建时间", column = "E")
    private Date crtdate;

    /**
     *
     */
    @ApiModelProperty(value = "修改时间", dataType = "Date")
    @ExcelAttribute(name = "修改时间", column = "F")
    //@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private Date upddate;
    /**
     * 描述
     */
    @ApiModelProperty(value = "描述", dataType = "String")
    @ExcelAttribute(name = "描述", column = "G")
    private String remark;
    /**
     *
     */
    @ApiModelProperty(value = "是否正常：0:正常 1：删除", dataType = "Integer")
    private Integer isDelete;
    /**
     *
     */
    @ApiModelProperty(value = "0-启用/1-禁用", dataType = "Integer")
    @ExcelAttribute(name = "0-启用/1-禁用", column = "H")
    private Integer isEnable;

    @ApiModelProperty(value = "参数代码", dataType = "String")
    @ExcelAttribute(name = "参数代码", column = "I")
    private String code;

    private List<ParameterDTO> children = new ArrayList<ParameterDTO>();

}
